
package cn.zlg.common.datadump.condition;

import java.util.Collection;

import lombok.Data;

@Data
public class QueryFieldWithValue {

    private QueryFieldCondition condition;

    private QueryFieldConditionSet conditionSet;

    private Object value;

    public QueryFieldWithValue() {
    }

    public QueryFieldWithValue(QueryFieldCondition condition, Object value) {
        super();
        this.condition = condition;
        this.value = value;
    }
    public QueryFieldWithValue(QueryFieldConditionSet condition, Object value) {
        super();
        this.conditionSet = condition;
        this.value = value;
    }

    public boolean valueIsArray() {
        return value != null && value.getClass().isArray();
    }

    public boolean valueIsCollection() {
        return value != null && value instanceof Collection;
    }

}
